<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="lib/layui/css/layui.css">
    <link rel="stylesheet" href="css/admin.css">
    <script src="js/vue.js"></script>
    <script src="js/axios.js"></script>
</head>
<body>
<div id="app">
<table class="layui-table">

    <colgroup>
        <col width="25%">
        <col width="25%">
        <col width="25%">
        <col width="25%">
    </colgroup>
    <thead>
    <tr>
        <th>编号</th>
        <th>操作人</th>
        <th>操作业务</th>
        <th>操作时间</th>
    </tr>
    </thead>
    <tbody>
    <tr v-for="(item,i) in log.transfers">
        <td>{{item.logId}}</td>
        <td>{{item.operator}}</td>
        <td>
            <span v-if="item.operationContent == 'queryFind'">条件交易单查询</span>
            <span v-else-if="item.operationContent == 'queryFind1'">普通交易单查询</span>
            <span v-else-if="item.operationContent == 'transferFind'">异常交易查询</span>
            <span v-else-if="item.operationContent == 'transferModify'">重发交易单</span>
            <span v-else-if="item.operationContent == 'execFind'">异常查询</span>
            <span v-else-if="item.operationContent == 'exceModify'">标记可疑用户</span>
            <span v-else-if="item.operationContent == 'logFind'">日志查询</span>
            <span v-else-if="item.operationContent == 'exceCancel'">取消标记可疑用户</span>

        </td>
        <td>{{item.operationDate}}</td>
    </tr>
    </tbody>
</table>
<button class="layui-btn layui-btn-radius"   v-on:click="prevPage">上一页</button>
<span style="font-size: 20px">当前{{page.index}}</span>|<span style="font-size: 20px">共{{log.pageCount}}</span>
<button class="layui-btn layui-btn-radius"  v-on:click="nextPage">下一页</button>
</div>
<script>
    var app = new Vue({
        el:"#app",
        data:{
            page:{
                index:1,
                pageSize:10,
                condition:"",
                start:null,
                end:null,
                status:null
            },
            log:{}
        },
        mounted:function () {
            this.getLog();
        },
        methods:{
           getLog:function () {
               var that = this;
               axios.post("/log/find",that.page).then(function (res) {
                   if(res.data.msg == "NO_AUTH"){
                       location.href="no_auth.html";
                   }else {
                       that.log =res.data.t;
                   }

               })
           },
            prevPage:function () {
                if(this.page.index>1){
                    this.page.index--;
                    this.getLog();
                }

            },
            nextPage:function () {
                console.log(this.page.index)
               console.log(this.log.pageCount)
                if (this.page.index<this.log.pageCount) {
                    this.page.index++;
                    this.getLog();
                }
            }
        }
    })
</script>
</body>
</html>
<script src="js/jquery-3.4.1.min.js"></script>
<script src="lib/layui/layui.js"></script>
<script src="js/admin.js"></script>